/******************************************************************************
 *
 * Project:		mGameEngine
 * File:		ipaddress.h
 * Author:		karooolek
 * Created on:	2009-03-14
 *
 ******************************************************************************/

#ifndef IPADDRESS_H_
#define IPADDRESS_H_

#include "types.h"

/**
 * IP address.
 * Machine address used by IP connections.
 */
struct IPAddress
{
	/**
	 * Host name.
	 */
	String hostname;

	/**
	 * Port number.
	 */
	uint16 port;

	/**
	 * Create new IP addres with initial values.
	 * @param hostname host name.
	 * @param port port number.
	 */
	IPAddress(const String &hostname = "", uint16 port = 1025);

	/**
	 * Check if IP address is valid.
	 * @return true if address is valid, false otherwise.
	 */
	bool isValid() const;
};

#endif // IPADDRESS_H_
